#ifndef MANAGEACCOUNTS_H
#define MANAGEACCOUNTS_H

#include <QtGui>
#include <QtSql>

#include "tab.h"
#include "accountmodel.h"

namespace Ui {
	class ManageAccounts;
}

class ManageAccounts : public Tab {
	Q_OBJECT
	Q_DISABLE_COPY(ManageAccounts)
public:
	explicit ManageAccounts(QWidget *parent = 0);
	virtual ~ManageAccounts();

	void initializeModel();
	void cleanup();

	virtual void updateContents();
	virtual void flushData();

protected:
	virtual void changeEvent(QEvent *e);

private:
	Ui::ManageAccounts *m_ui;
	AccountModel *m_model;

public slots:
	void slot_updateNDBalances(const double&, const double&);

private slots:
	void on_deleteAccountButton_clicked();
	void on_addAccountButton_clicked();
};

#endif // MANAGEACCOUNTS_H
